﻿using System;

namespace Noria.Web.MyMSDN
{
    internal interface IStatistics : IDisposable
    {
        /// <summary>
        /// Increase the count of HttpWebRequest with latency and payload
        /// </summary>
        void AddHttp(long latency, long payload);

        long GetCount();
        long GetLatency();
        long GetPayload();


        /// <summary>
        /// Increase the count of update
        /// </summary>
        void AddUpdated();

        /// <summary>
        /// Increase the count of insertion
        /// </summary>
        void AddInserted();

        /// <summary>
        /// Increase the count of deletion
        /// </summary>
        void AddDeleted();

        /// <summary>
        /// Increase the count of non-fatal error
        /// </summary>
        void AddError();

        /// <summary>
        /// Cancel the process due to event has been signaled
        /// </summary>
        void Cancel();

        /// <summary>
        /// Abort the process due to fatal error occurs
        /// </summary>
        void Fault();

    }
}